﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="iINGRESOCIERRESERVICIO.aspx.vb" Inherits="IMSS.SA.Formulario_web19" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .style1
    {
        height: 21px;
        text-align: center;
    }
    .style2
    {            text-align: center;
        }
    .style3
    {
        height: 21px;
    }
    .style4
    {
        width: 496px;
        height: 21px;
    }
        .style7
        {
            text-align: center;
        }
        .style8
        {
            text-align: center;
            height: 79px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width: 100%; background-color: #006699; color: #FFFFFF;">
    <tr>
        <td class="style8" colspan="2" 
            style="background-image: url('../Styles/r3.PNG'); background-repeat: no-repeat; background-position: left">
            <asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label>
            </td>
    </tr>
    <tr>
        <td class="style7">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style1" colspan="2">
            CIERRE DE ORDENES DE SERVICIO</td>
    </tr>
    <tr>
        <td class="style4">
        </td>
        <td class="style3">
        </td>
    </tr>
    <tr>
        <td class="style7">
            ID_SERVICIO</td>
        <td>
            <asp:TextBox ID="TextBox1" runat="server" MaxLength="15"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style7">
            DESCRIPCION_SERVICIO</td>
        <td>
            <asp:TextBox ID="Textdescripcion" runat="server" Height="110px" Width="401px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style7">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style7">
            <asp:Button ID="Button1" runat="server" Text="ENVIAR" style="height: 26px" />
        </td>
        <td style="text-align: center">
            <asp:Button ID="Button2" runat="server" Text="BORRAR" />
        </td>
    </tr>
    <tr>
        <td class="style7">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style2" colspan="2">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" DataKeyNames="Id_servicio" DataSourceID="SqlDataSource1" 
                ForeColor="#333333" GridLines="None">
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <Columns>
                    <asp:BoundField DataField="Id_servicio" HeaderText="Id_servicio" 
                        ReadOnly="True" SortExpression="Id_servicio" />
                    <asp:BoundField DataField="descripcion" HeaderText="descripcion" 
                        SortExpression="descripcion" />
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:IMSS.SAConnectionString27 %>" 
                SelectCommand="SELECT * FROM [CIERRE_SERVICIO]" 
                DeleteCommand="DELETE FROM [CIERRE_SERVICIO] WHERE [Id_servicio] = @Id_servicio" 
                InsertCommand="INSERT INTO [CIERRE_SERVICIO] ([Id_servicio], [descripcion]) VALUES (@Id_servicio, @descripcion)" 
                UpdateCommand="UPDATE [CIERRE_SERVICIO] SET [descripcion] = @descripcion WHERE [Id_servicio] = @Id_servicio">
                <DeleteParameters>
                    <asp:Parameter Name="Id_servicio" Type="String" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:ControlParameter ControlID="TextBox1" Name="Id_servicio" 
                        PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="Textdescripcion" Name="descripcion" 
                        PropertyName="Text" Type="String" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="descripcion" Type="String" />
                    <asp:Parameter Name="Id_servicio" Type="String" />
                </UpdateParameters>
            </asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td class="style7">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
</asp:Content>
